﻿<%@ Control Language="C#" AutoEventWireup="false" CodeBehind="SwirlingQuestionList.ascx.cs"
    Inherits="ud_SwirlingQuestion.SwirlingQuestionList" %>
<asp:Literal ID="ltrAutoScrollCssSetup" runat="server" />
<asp:Literal ID="ltrScript" runat="server" />
<div class="qawrapper">
    <asp:Panel ID="pnlQA" runat="server" CssClass="qacenter-rightnav" SkinID="plain">
        <asp:Panel ID="pnlScrollable" runat="server">
            <div class="items">
                <asp:ListView ID="lvQA" runat="server" ItemPlaceholderID="placeHolder">
                <LayoutTemplate>
                    <asp:PlaceHolder ID="placeHolder" runat="server" />
                </LayoutTemplate>
                    <ItemTemplate>
                        <asp:Panel ID="pnlQAItem" runat="server" CssClass="blogitem">
                            <h3 class="qatitle">
                                <asp:HyperLink SkinID="BlogTitle" ID="lnkTitle" runat="server" EnableViewState="false" ToolTip='<%# Eval("Title") %>'
                                    Text='<%# FormatBlogTitle(DataBinder.Eval(Container.DataItem,"Title").ToString(), Config.MaxCharsInTitle) %>'
                                    Visible='<%# Config.UseLinkForHeading %>' NavigateUrl='<%# FormatQuestionUrl(DataBinder.Eval(Container.DataItem,"ItemUrl").ToString(), DataBinder.Eval(Container.DataItem,"Guid").ToString())  %>'>
                                </asp:HyperLink><asp:Literal ID="litTitle" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"Title") %>'
                                    Visible='<%#(!Config.UseLinkForHeading) %>' />&nbsp;
                                <asp:HyperLink ID="editLink" runat="server" EnableViewState="false" Text="<%# EditLinkText %>"
                                    ToolTip="<%# EditLinkTooltip %>" ImageUrl='<%# EditLinkImageUrl %>' NavigateUrl='<%# SiteRoot + "/SwirlingQuestion/Admin/SwirlingQuestionEdit.aspx?pageid=" + PageId + "&amp;item=" + DataBinder.Eval(Container.DataItem,"Guid") + "&amp;mid=" + ModuleId %>'
                                    Visible="<%# IsEditable %>" CssClass="ModuleEditLink" /></h3>
                            <div class="blogdate">
                                <span class="blogauthor">
                                    <%# FormatPostAuthor(DataBinder.Eval(Container.DataItem, "CreatedByName").ToString())%></span>
                                <span class="bdate">
                                    <%# FormatBlogDate(Convert.ToDateTime(Eval("LastModified"))) %></span>
                            </div>
                            <asp:Panel ID="pnlQuestion" runat="server" CssClass="question" Visible='<%# !Config.TitleOnly %>'>
                            <mp:SiteLabel ID="lblQuestionPrefix" runat="server" ResourceFile="SwirlingQuestionResource" ConfigKey="QuestionPrefix" CssClass="questionprefix" />
                                    <%# FormatAnswer(Eval("Question").ToString(), string.Empty, Eval("ItemUrl").ToString(), Eval("Guid").ToString())%>
                            </asp:Panel>
                            
                            <asp:Panel ID="pnlAnswer" runat="server" Visible='<%# !Config.TitleOnly %>' CssClass="answer">
                                <%--<portal:mojoRating runat="server" ID="Rating" Enabled='<%# EnableContentRating %>'
                            ContentGuid='<%# new Guid(Eval("BlogGuid").ToString()) %>' AllowFeedback='false' />--%>
                                <div class="answertext">
                                    <div class="body">
                                        <mp:SiteLabel ID="lblAnswerPrefix" runat="server" ResourceFile="SwirlingQuestionResource" ConfigKey="AnswerPrefix" CssClass="answerprefix" />
                                        <%# FormatAnswer(DataBinder.Eval(Container.DataItem, "Answer").ToString(), string.Empty, DataBinder.Eval(Container.DataItem, "ItemUrl").ToString(), Eval("Guid").ToString())%></div>
                                </div>
                            </asp:Panel>
                            <%--<div class="bsocial">
                        <portal:TweetThisLink id="tt1" runat="server" Visible='<%# Config.ShowTweetThisLink && !Config.UseExcerpt %>' UrlToTweet='<%# FormatBlogTitleUrl(DataBinder.Eval(Container.DataItem,"ItemUrl").ToString(), Convert.ToInt32(DataBinder.Eval(Container.DataItem,"ItemID"))) %>' TitleToTweet='<%# DataBinder.Eval(Container.DataItem,"Heading") %>' />
                        <portal:FacebookLikeButton ID="fbl1" runat="server" Visible='<%# (Config.UseFacebookLikeButton && !Config.UseExcerpt) %>' 
                            UrlToLike='<%# FormatBlogTitleUrl(DataBinder.Eval(Container.DataItem,"ItemUrl").ToString(), Convert.ToInt32(DataBinder.Eval(Container.DataItem,"ItemID"))) %>'
                             ColorScheme='<%# Config.FacebookLikeButtonTheme %>' ShowFaces='<%# Config.FacebookLikeButtonShowFaces %>'
                             WidthInPixels='<%# Config.FacebookLikeButtonWidth %>' HeightInPixels='<%# Config.FacebookLikeButtonHeight %>' />
                        </div>
                        <div class="blogcommentlink">
                            <asp:HyperLink ID="Hyperlink2" runat="server" EnableViewState="false" Text='<%# FeedBackLabel + "(" + DataBinder.Eval(Container.DataItem,"CommentCount") + ")" %>'
                                Visible='<%# Config.AllowComments && ShowCommentCounts %>' NavigateUrl='<%# FormatQuestionUrl(DataBinder.Eval(Container.DataItem,"ItemUrl").ToString(), Convert.ToInt32(DataBinder.Eval(Container.DataItem,"ItemID")))  %>'
                                CssClass="blogcommentlink"></asp:HyperLink>
                            <asp:HyperLink ID="Hyperlink1" runat="server" EnableViewState="false" Text='<%# FeedBackLabel %>'
                                Visible='<%# Config.AllowComments && !ShowCommentCounts %>' NavigateUrl='<%# FormatQuestionUrl(DataBinder.Eval(Container.DataItem,"ItemUrl").ToString(), Convert.ToInt32(DataBinder.Eval(Container.DataItem,"ItemID")))  %>'
                                CssClass="blogcommentlink"></asp:HyperLink>&#160;
                        </div>--%>
                        </asp:Panel>
                    </ItemTemplate>
                </asp:ListView>
            </div>
        </asp:Panel>
        <div class="answerpager">
            <portal:mojoCutePager ID="pgr" runat="server" />
        </div>
        <asp:Panel ID="pnlOthersArticle" runat="server" CssClass="otherpanel">
            <div class="otherheader">
                <mp:SiteLabel ID="lblOtherHeader" runat="server" ResourceFile="ArticleResources"
                    ConfigKey="OtherArticleLabel" CssClass="otherheadertext" />
            </div>
            <asp:UpdatePanel ID="upOthersArticle" runat="server" UpdateMode="Conditional">
                <ContentTemplate>
                    <mp:mojoGridView ID="gvOthersArticle" runat="server" AutoGenerateColumns="false"
                        CssClass="otheritems">
                        <Columns>
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <div class="item">
                                        <asp:HyperLink ID="hplOtherTitle" runat="server" title="" ToolTip='<%# FormatTooltip(DataBinder.Eval(Container.DataItem,"Question").ToString(), DataBinder.Eval(Container.DataItem,"Answer").ToString()) %>'
                                            CssClass="link" Text='<%# Eval("Question") %>' NavigateUrl='<%# FormatQuestionUrl(DataBinder.Eval(Container.DataItem,"ItemUrl").ToString(), DataBinder.Eval(Container.DataItem,"ItemID").ToString()) %>' />
                                    </div>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                    </mp:mojoGridView>
                </ContentTemplate>
            </asp:UpdatePanel>
        </asp:Panel>
        <asp:Panel ID="pnlPostQuestion" runat="server" CssClass="postquestion">
            <portal:mojoButton ID="btnPostQuestion" runat="server" />
        </asp:Panel>
        <div class="cleared">
        </div>
    </asp:Panel>
    <div class="copyright">
        <asp:Label ID="lblCopyright" runat="server" />
    </div>
</div>
<div class="modulefooter">
</div>
